package domain;

import gui2.outputInterface;

/*
 * Represents the AI/CPU player.
 */
/*
 * IMPLEMENTATION STATUS - AI.
 */
public class Computer extends Player
{

    // level is a representation of difficulty, ranging from 1 as easy to X hard.
    private int level;
    private outputInterface outInterface;
    boolean debudmode = false;
    private MonteCarlo mc;

    // Constructor.
    public Computer(String name, int playerID, int level, outputInterface outInterface, int debugmode)
    {
        super(name, playerID);
        this.level = level;
        this.outInterface = outInterface;
        mc = new MonteCarlo(outInterface, playerID);
        
        if (debugmode > 0) {
            this.debudmode = true;
        }
    }
    
    @Override
    public void evaluateGame(GameGrid g) {
        mc.evaluateGame(g);
    }

    // Returns a move with the level in consideration.
    @Override
    public Move makeMove(GameGrid g)
    {
//        if (debudmode) {
//            MinMax mx = new MinMax(g, super.getPlayerID(), level, outInterface);
//            mx.findBestMove();
//            AlphaBeta ab = new AlphaBeta(g, super.getPlayerID(), level, outInterface, true);
//            return ab.findBestMove();
//        }
//        
//        AlphaBeta ab = new AlphaBeta(g, super.getPlayerID(), level, outInterface, false);
        
        
        
        return mc.getMove(g);
    }
}
